package socketdemo4;

import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;

public class ClientDemo {
    public static void main(String[] args) throws IOException {
        DatagramSocket ds = new DatagramSocket();

        String s = "hello";
        byte [] bytes = s.getBytes();
        // InetAddress.getByName("224.0.1.0");
        // int port = 10000;
        DatagramPacket dp = new DatagramPacket(bytes,bytes.length,
                InetAddress.getByName("224.0.1.0"), 10000);
        ds.send(dp);
        ds.close();
    }
}
